using UnityEngine;

public class MessageButton : MonoBehaviour
{
	public UILabel message;

	public UISprite fav;

	public MatchUI ui;

	public void Init(string msg, bool favourite)
	{
		message.text = msg;
		Color color = fav.color;
		if (favourite)
		{
			color.a = 1f;
		}
		else
		{
			color.a = 0.5f;
		}
		fav.color = color;
	}

	public void OnClick()
	{
		ui.OnSendMessage(message.text);
	}
}
